/*********************************************************
          File Name:10.22.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Mon 14 Mar 2016 06:19:22 PM CST
**********************************************************/

#include <iostream>
#include <functional> // bind
#include <string>
#include <vector>
#include <algorithm>

bool jduge(const std::string &s, std::string::size_type limit)
{
    return s.size() <= limit;
}

int main()
{
    using std::placeholders::_1;
    std::vector<std::string> vs{"my", "E-Mail", "is", "abbytsing@gmail.com"};
    auto callable = std::bind(jduge, 6, _1);

    auto res = count_if(vs.cbegin(), vs.cend(), callable);

    std::cout << res << std::endl;
    return 0;
}
